package com.adou.second.day10;

import java.io.Serializable;

/**
 * 
 * @author admin
 *
 */
public class Student implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 411436118101186462L;
	
	private String name;
	
	/**
	 * 不序列化
	 */
	private  transient int chinese;
	private int math;
	private int english;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getChinese() {
		return chinese;
	}
	public void setChinese(int chinese) {
		this.chinese = chinese;
	}
	public int getMath() {
		return math;
	}
	public void setMath(int math) {
		this.math = math;
	}
	public int getEnglish() {
		return english;
	}
	public void setEnglish(int english) {
		this.english = english;
	}
	
	/**
	 * 总成绩
	 * @return
	 */
	public int getSum() {
		return chinese + math + english;
	}
	
	@Override
	public String toString() {
		return "Student [name=" + name + ", chinese=" + chinese + ", math="
				+ math + ", english=" + english + "]";
	}
//	
//	@Override
//	public boolean equals(Object obj) {
//		// TODO Auto-generated method stub
//		return super.equals(obj);
//	}
}
